import java.util.Arrays;

public class test {

    public static void func1(int[] temp1)
    {
        temp1 = new int[10];
        temp1[1] = 99;
    }

    public static void func2(int[] temp2)
    {
        temp2[1] = 99;
    }

    public static int[] func3(int[] temp3)
    {
        temp3 = new int[]{7,8,9};
        return temp3;
    }

    public static void main(String[] args) {
        int[] arr1 = {1,2,3,4};
        func1(arr1);
        //String ret1 = Arrays.toString(arr1);
        System.out.println(Arrays.toString(arr1));
        for(int x:arr1)
        {
            System.out.print(x + " ");
        }
        System.out.println();
        func2(arr1);
        System.out.println(Arrays.toString(arr1));
        for(int i = 0; i < arr1.length; i++)
        {
            System.out.print(arr1[i] + " ");
        }
        System.out.println();
        int[] ret = func3(arr1);
        System.out.println(Arrays.toString(ret));
        System.out.println(Arrays.toString(arr1));
    }
}
